from sys import argv

import zmail


def send_mail(subject, content):
    mail_content = {
        "subject": subject,
        "content": content
    }
    server = zmail.server('172552190@qq.com', 'uspzpblkgkppbhjh')
    server.send_mail('daidongyang@boxiao.cn', mail_content)


def main():
    if len(argv) < 2:
        print("argv's len is less 1.")
        return
    subject = argv[1]
    content = ""
    if len(argv) > 2:
        content = argv[2]
    send_mail(subject, content)


if __name__ == '__main__':
    main()
